package common.statusenum;

import java.util.HashMap;

/**
 * 用户类型枚举
 *
 * @author yuanqinglong
 * @since 2020/9/8 9:50
 */
public enum UserTypeEnum {

    /**
     * .
     */
    USER("0", "用户"),
    ORGANIZATION("1", "机构");


    private final String code;
    private final String msg;

    UserTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public String getCode() {
        return this.code;
    }


    public String getMsg() {
        return this.msg;
    }

    static HashMap<String, String> map = new HashMap(32);

    static {
        for (UserTypeEnum value : UserTypeEnum.values()) {
            map.put(value.code, value.msg);
        }
    }

    public static String getMsgByCode(String code) {
        return map.get(code);
    }

}
